A next-generation data center is a software-defined data center. To meet requirements of service expansion and virtual-machine online migration, the next-generation data center needs to support a layer 2 network as large as possible. A Virtual Extensible Local Area Network (VXLAN) technology is a typical technology of an overlay network. In the VXLAN, an original Ethernet frame is encapsulated in a User Data Protocol (UDP) packet. A layer 2 network may be expanded within a layer 3 range using the VXLAN technology, so that a virtual machine can be migrated in an interconnected layer 3 network range without changing an IP address and a Media Access Control (MAC) address, thereby ensuring service continuity and providing sufficient virtual network partition resources for a large-scale and multi-tenant cloud environment. However, encapsulating a raw packet using the VXLAN technology causes packet encapsulation overheads, and leads to excessive network bandwidth consumption in a subsequent data packet transmission process. Moreover, in some networks, UDP transmission is unavailable, and consequently, the VXLAN technology cannot be used in these networks.